package com.tedu.Day02.oop;

import java.io.Serializable;

/**
 * 实体类：属性 对应  数据库【字段】
 */
public class Person extends Object implements Serializable {
    public static void main(String[] args) {
        Person p=new Person();//打印对象的地址值
        System.out.println(p.toString());
    }
    private String mame;//私有属性
    private int age;
    private char sex;

    public String getMame() {
        return mame;
    }

    public void setMame(String mame) {
        this.mame = mame;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }
    //调取默认构造器:打桩

    public Person() {
        System.out.println("person......");
    }
    //程序员：toString()  调取--不用手写
    //打印对象，不调取  地址值   数据类型@十六进制值

    @Override
    public String toString() {
        return "Person{" +
                "mame='" + mame + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                '}';
    }
}
